﻿import request from '/@/utils/request';
enum Api {
  AddXuankeTask = '/api/xuankeTask/add',
  DeleteXuankeTask = '/api/xuankeTask/delete',
  UpdateXuankeTask = '/api/xuankeTask/update',
  PageXuankeTask = '/api/xuankeTask/page',
  DetailXuankeTask = '/api/xuankeTask/detail',
  InitXuankeTask = '/api/xuankeTask/init',
  ImportXuankeTask = '/api/xuankeTask/import',
}

// 增加选课任务
export const addXuankeTask = (params?: any) =>
	request({
		url: Api.AddXuankeTask,
		method: 'post',
		data: params,
	});

// 删除选课任务
export const deleteXuankeTask = (params?: any) => 
	request({
			url: Api.DeleteXuankeTask,
			method: 'post',
			data: params,
		});

// 编辑选课任务
export const updateXuankeTask = (params?: any) => 
	request({
			url: Api.UpdateXuankeTask,
			method: 'post',
			data: params,
		});

// 分页查询选课任务
export const pageXuankeTask = (params?: any) => 
	request({
			url: Api.PageXuankeTask,
			method: 'post',
			data: params,
		});

// 详情选课任务
export const detailXuankeTask = (id: any) => 
	request({
			url: Api.DetailXuankeTask,
			method: 'get',
			data: { id },
		});

export const initXuankeTask = (params?: any) => 
	request({
			url: Api.InitXuankeTask,
			method: 'post',
			data: params,
		});

export const importXuankeTask = (params?: any) => 
		request({
				url: Api.ImportXuankeTask,
				method: 'post',
				data: params,
			});
		